package com.askinhand.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.struts2.json.annotations.JSON;

import com.askinhand.bean.User;
import com.askinhand.service.IUserService;
import com.opensymphony.xwork2.ActionSupport;

public class PasswordChangeAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	IUserService userService;
	
	String uid;
	String password;
	String strResult;
	
	public String getStrResult() {
		return strResult;
	}
	public void setStrResult(String strResult) {
		this.strResult = strResult;
	}
	@JSON(serialize=false)
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	@JSON(serialize=false)
	public IUserService getUserService() {
		return userService;
	}
	@Resource
	public void setUserService(IUserService userService) {
		this.userService = userService;
	}
	
	
	@JSON(serialize=false)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String execute(){
		
		strResult=userService.changePassword(password, uid);
		return "success";
		
		
	}
}
